<template>
    <div> 
       <my-swiper :img-list="imgList"></my-swiper>
    </div>
    <div>
       <submenu :menus="menuList"></submenu>
    </div>
    <div>
        <hot-goods :goodsList="goodsList"></hot-goods>
        
    </div>
</template>

<script setup>
import { onMounted, ref } from 'vue';
import submenu from '@/components/submenu.vue';
import mySwiper from '@/components/swipe.vue';
import { getImgs,getGoodsList } from '@/api/login.js';
import hotGoods from '@/components/hotgoods.vue';
const imgList = ref()
onMounted(async () => {
const res = await getImgs()
imgList.value = res.data
})

const menuList = [
 { name: '新闻资讯', pos: [-96, -121] },
 { name: '图⽚分享', pos: [-312, -121] },
 { name: '商品购买', pos: [-96, -327] },
 { name: '留⾔反馈', pos: [-96, -527] },
 { name: '视频专区', pos: [-312, -732] },
 { name: '联系我们', pos: [-312, -527] }
]

const goodsList = ref()
onMounted(async () => {
const res2 = await getGoodsList()
goodsList.value = res2.data
})
</script>

<style lang="scss" scoped>

</style>